package com.stxx.stiot2.mqtt;

import org.dromara.mica.mqtt.core.server.MqttServerCreator;
import org.dromara.mica.mqtt.core.server.MqttServerCustomizer;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;

@Configuration
public class MqttServerConfiguration {

    @Bean
    public MqttServerCustomizer mqttServerCustomizer() {
        return new MqttServerCustomizer() {
            @Override
            public void customize(MqttServerCreator creator) {
                // 此处可自定义配置 creator，会覆盖 yml 中的配置
                System.out.println("----------------MqttServerCustomizer-----------------");
            }
        };
    }

}